package org.example.service.Impl;

import io.seata.spring.annotation.GlobalTransactional;
import org.example.client.TestOpenFeignClient;
import org.example.entity.User;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SeataServiceImpl {
    @Autowired
    private TestOpenFeignClient testOpenFeignClient;
    @Autowired
    private UserService userService;
    @GlobalTransactional
    public void testSeata() {
        testOpenFeignClient.test();
        userService.save(new User("1","1","1"));
        int i=1/0;
    }
}
